<div class="container forget_pwd_container">
  <div class="panel">
    <h3 class="panel-title">找回密码</h3>
  </div>
  <div class="panel-body">
    <form *ngIf="!message" #form="ngForm" (ngSubmit)="form.form.valid && sendValidationEmail()" role="form" novalidate>
      <div class="form-group">
        <label for="" class="col-sm-2 control-label">邮箱</label>
        <div class="col-sm-10">
          <input type="email" class="form-control"
                 name="email"
                 placeholder="注册时使用的邮箱"
                 required
                 #email="ngModel"
                 [(ngModel)]="user.email"
                 pattern="^([a-zA-Z0-9_-])+@([a-zA-Z0-9_-])+((\.[a-zA-Z0-9_-]{2,3}){1,2})$"
          />
          <div *ngIf="form.submitted && !email.valid" class="text-danger">请输入注册时使用的邮箱。</div>
        </div>
      </div>
      <div class="form-group">
        <div class="col-sm-offset-2 col-sm-10">
          <button type="submit" class="btn btn-success">发送验证邮件</button>
        </div>
      </div>
    </form>
    <div *ngIf="message" class="alert alert-{{messageType}}">{{message}}</div>
  </div>
</div>
